#ifndef _RF_MONITOR_TYPES_H_
#define _RF_MONITOR_TYPES_H_

// Define struture to pass parameters to thread.
typedef struct {
  // These are the common parameters for all the sensing types of threads.
  void *channel_handler;              // Pointer to a rf_uhd_channel_handler_t struct.
  srslte_rf_t *rf;                    // RF object.
  size_t sensing_channel;             // Specify which channel should be used for sensing the spectrum.
  // The following fields must be confgured through command line.
  unsigned long single_log_duration;  // Duration of a single log in milliseconds.
  unsigned long logging_frequency;    // How frequent the log happens in milliseconds.
  unsigned long max_number_of_dumps;  // Maximum number of dump files to be created.
  char *path_to_start_file;           // Full path to the file generated by start.sh wait until this file exists before logging.
  char *path_to_log_files;            // Location of the directory to collect log
  unsigned int node_id;               // SRN node id
  double central_frequency;           // Central frequency at which the sensing module should operate.
  uint32_t nof_prb;                   // Number of Physical Resource Blocks.
  double sample_rate;                 // Sample rate.
  double sensing_rx_gain;             // RX gain that should be applied to the specific channel RX cahin.
  srslte_datatype_t data_type;        // Data type used to store IQ samples into file.
  double competition_bw;              // Bandwidth specified during competion initialization.
  double phy_bw;                      // Bandwidth used by the PHY.
  float lbt_threshold;                // Channel threshold level used to set the level necessary to declare channel BUSY or FREE.
  uint64_t lbt_timeout;               // LBT timeout given in milliseconds.
  bool lbt_use_fft_based_pwr;         // Indicates if power must be based on FFT or simply time-domain samples.
  uint32_t lbt_channel_to_monitor;    // Channel used to monitor TX.
  uint32_t maximum_backoff_period;    // Maximum backoff period.
  bool iq_dumping;                    // By default we never create IQ dumping files.
  bool immediate_transmission;        // Disable or enable immediate transmissions.
  uint32_t rf_monitor_option;         // Select which one of the RF monitor modules to run.
} rf_monitor_handle_t;

#endif // _RF_MONITOR_TYPES_H_
